package test.aon.resources;

import org.junit.Assert;

import main.aon.skeleton.Belly;
import cucumber.api.java.After;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;

public class Stepdefs {
	
	
	
	@Given("^I have (\\d+) cukes in my belly$")
	public void I_have_cukes_in_my_belly(int cukes) throws Throwable {
		Belly belly = new Belly();
		belly.eat(cukes);
	}

	@When("^I wait (\\d+) hour$")
	public void i_wait_hour(int arg1) throws Throwable {
		// Write code here that turns the phrase above into concrete actions
		System.out.println("waited for " + arg1 + "hours");
	}

	@Then("^my belly should growl$")
	public void my_belly_should_growl() throws Throwable {
		// Write code here that turns the phrase above into concrete actions
		System.out.println("belly grown");
	}

	@Given("^I navigate to \"(.*?)\" page$")
	public void i_navigate_to_page(String portletName) throws Throwable {

	}

	@When("^I missed \"(.*?)\"$")
	public void i_missed(String labelName) throws Throwable {
		System.out.println("");
	}

	@Then("^It should give an error \"(.*?)\"$")
	public void it_should_give_an_error(String errorMessgage) throws Throwable {
		Assert.assertTrue("Value aren't equal", errorMessgage
				.equalsIgnoreCase("The Account Type field is required."));
	}
}
